#pragma once
#include "Attack.h"
#include "Topology.h"
#include "NirTwoVector.h"

//Shortest - Path, Export - All attack strategy. 
//Announce to every neighbor, the shortest possible path
//that is not agged as bogus by the secure routing protocol.

class SpeaWithConnectivity : public Attack
{
public:
	SpeaWithConnectivity(Topology* pTopology, As* pVictim, As* pAttacker);
	~SpeaWithConnectivity();

	Vector<As*> DijkstraGetShortestPathTo(Vertex* vertex, Map<Vertex*, Vertex*> *previous);
	typedef int weight_t;
	weight_t max_weight;

	void DijkstraComputePaths(Vertex* source,
		Map<Vertex*, weight_t> *min_distance,
		Map<Vertex*, Vertex*> *previous);

private:
	Graph* _topology;
	Vertex* _firstHopInSpeaMsg;
	BgpMessage* _msg;

	Set<As*>* CreateWhoToSendTo(Topology* pTopology, As* pVictim, As* pAttacker);
	BgpMessage* CreateSpeaMsg(Topology* pTopology, As* pVictim, As* pAttacker);

};


